package ycl.base.common.enums;

import lombok.Getter;

/**
 * 数字繁体枚举
 *
 * @author: YCL
 * @date: 2021/12/10 22:28:02
 */
@Getter
public enum NumMultiplyEnum {
	ZERO(0, "零"),
	ONE(1, "壹"),
	TWO(2, "贰"),
	THREE(3, "叁"),
	FOUR(4, "肆"),
	FIVE(5, "伍"),
	SIX(6, "陆"),
	SEVEN(7, "柒"),
	EIGHT(8, "捌"),
	NINE(9, "玖"),
	TEN(10, "拾"),
	HUNDRED(100, "佰"),
	THOUSAND(1000, "仟"),
	TEN_THOUSAND(10000, "萬"),
	;

	private final int num;
	public final String multiply;

	NumMultiplyEnum(int num, String multiply) {
		this.num = num;
		this.multiply = multiply;
	}

	public static String getByNum(int num) {
		for (NumMultiplyEnum e : NumMultiplyEnum.values())
			if (e.num == num)
				return e.multiply;
		throw new NullPointerException("无此数字");
	}
}
